Hệ thống quản lý phòng khám trực tuyến bằng PHP

1
2 <?php
3 define(
'PREPEND_PATH','../');
4 include(
"../defaultLang.php"); //1
5 include(
"../language.php"); //2
6 include(
"../lib.php"); //3
7 //
this is the core file of the appGini
8 include_once(
"../header.php");
9 ?>
10
11 <?php
12 echo
'<div style="height:60px;">' . '</div>';
13
14 echo
'<div class="btn-group-vertical btn-group-lg" style="width: 100%;">' .
15  
'<button type="button" class="btn btn-default btn-lg" data-toggle="modal" data-target="#myModal">' .
16  
'<i class="glyphicon glyphicon-search"></i> Search Patients by History</button>' .
17  
'</div>';
18
19 echo
'<div style="height:60px;">' . '</div>';
20
21
22 echo
'<div class="btn-group-vertical btn-group-lg" style="width: 100%;">' .
23  
'<button type="button" class="btn btn-default btn-lg" data-toggle="modal" data-target="#myModal2">' .
24  
'<i class="glyphicon glyphicon-search"></i> Search Patients by Prescription</button>' .
25  
'</div>';
26
27
28 echo
'<div style="height:60px;">' . '</div>';
29
30
31 echo
'<div class="btn-group-vertical btn-group-lg" style="width: 100%;">' .
32  
'<button type="button" class="btn btn-default btn-lg" data-toggle="modal" data-target="#myModal3">' .
33  
'<i class="glyphicon glyphicon-search"></i> Search Patients by Diagnosis</button>' .
34  
'</div>';
35
36 include_once(
"../footer.php"); // include the footer file
37 ?>
38
39
40
41
42 <!-- Modal -->
43 <div
class="modal fade" id="myModal" role="dialog">
44     <div
class="modal-dialog modal-lg">
45         <div
class="modal-content">
46             <div
class="modal-header">
47                 <button type=
"button" class="close" data-dismiss="modal">&times;</button>
48                 <h4
class="modal-title">Search By Patient History </h4>
49             </div>
50             <div
class="modal-body">
51
52                 <div
class="form-group">
53                     <form action=
"patient_history.php" method="post">
54                         <div
class="form-group">
55
56                             <div
class="row">
57                                 <div
class="col-sm-8" style="margin-left: 0px" >
58                                     <input type=
"text" name="search" id="search_box" class="form-control" />
59                                 </div>
60                                 <div
class="col-sm-4" >
61                                     <div id=
"searchresults">
62                                         <p id=
"results" class="update"> matching results
63                                         </p>
64                                     </div>
65                                 </div>
66                             </div>
67
68
69                         </div>
70
71                         <button type=
"submit" class="btn btn-success">Search</button>
72
73                     </form>
74                 </div>
75             </div>
76
77             <div
class="modal-footer">
78                 <button type=
"button" class="btn btn-default" data-dismiss="modal">Close</button>
79             </div>
80         </div>
81     </div>
82 </div>
83
84
85
86
87
88
89
90 <div
class="modal fade" id="myModal2" role="dialog">
91     <div
class="modal-dialog modal-lg">
92         <div
class="modal-content">
93             <div
class="modal-header">
94                 <button type=
"button" class="close" data-dismiss="modal">&times;</button>
95                 <h4
class="modal-title">Search Patients by Prescription</h4>
96             </div>
97             <div
class="modal-body">
98
99
100                 <div
class="form-grouPresciptionp">
101                     <form action=
"patient_prescription.php" method="get">
102                         <div
class="form-group">
103
104                             <div
class="row">
105                                 <div
class="col-sm-8" style="margin-left: 0px" >
106                                     <input type=
"text" name="search" id="search_box2" class="form-control" />
107                                 </div>
108                                 <div
class="col-sm-4" >
109                                     <div id=
"searchresults1">
110                                         <p id=
"results1" class="update"> matching results
111                                         </p>
112                                     </div>
113                                 </div>
114                             </div>
115
116
117                         </div>
118
119                         <button type=
"submit" class="btn btn-success">Search</button>
120
121                     </form>
122                 </div>
123
124
125
126
127             </div>
128             <div
class="modal-footer">
129                 <button type=
"button" class="btn btn-default" data-dismiss="modal">Close</button>
130             </div>
131         </div>
132     </div>
133 </div>
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150 <div
class="modal fade" id="myModal3" role="dialog">
151     <div
class="modal-dialog modal-lg">
152         <div
class="modal-content">
153             <div
class="modal-header">
154                 <button type=
"button" class="close" data-dismiss="modal">&times;</button>
155                 <h4
class="modal-title">Search Patients by Diagnosis</h4>
156             </div>
157             <div
class="modal-body">
158
159                 <div
class="form-group">
160                     <form action=
"patient_diagnosis.php" method="post">
161                         <div
class="form-group">
162
163                             <div
class="row">
164                                 <div
class="col-sm-8" style="margin-left: 0px" >
165                                     <input type=
"text" name="search" id="search_box3" class="form-control" />
166                                 </div>
167                                 <div
class="col-sm-4" >
168                                     <div id=
"searchresults2">
169                                         <p id=
"results2" class="update"> matching results
170                                         </p>
171                                     </div>
172                                 </div>
173                             </div>
174
175
176                         </div>
177
178                         <button type=
"submit" class="btn btn-success">Search</button>
179
180                     </form>
181                 </div>
182
183
184             </div>
185             <div
class="modal-footer">
186                 <button type=
"button" class="btn btn-default" data-dismiss="modal">Close</button>
187             </div>
188         </div>
189     </div>
190 </div>
191
192
193
194
195
196
197
198
199
200
201 <script>
202     $j(function () {
203
204         $j(
'#CategoryDropDown').select2();
205
206
207         $j(
'#CategoryDropDown2').select2();
208
209
210
211         $j(
'#CategoryDropDown3').select2();
212
213     })
214
215 </script>
216
217
218 <script type=
"text/javascript">
219
220     $j(function () {
221
222         $j(
"#search_box").keyup(function () {
223             
// getting the value that user typed
224             
var searchString = $j("#search_box").val();
225             
// forming the queryString
226             
var data = 'search=' + searchString;
227
228             
// if searchString is not empty
229             
if (searchString) {
230                 
// ajax call
231                 $j.ajax({
232                     type:
"POST",
233                     url:
"ajax_history.php",
234                     data: data,
235                     beforeSend: function (html) {
// this happens before actual call
236                         $j(
"#results").html('');
237                         $j(
"#searchresults").show();
238                         $j(
".word").html(searchString);
239
240                     },
241                     success: function (html) {
// this happens after we get results
242                         $j(
"#results").show();
243                         $j(
"#results").append(html);
244                         
// console.log(html)
245                     }
246                 });
247             }
248             
return false;
249         });
250
251
252
253         $j(
"#search_box2").keyup(function () {
254             
// getting the value that user typed
255             
var searchString = $j("#search_box2").val();
256             
// forming the queryString
257             
var data = 'search=' + searchString;
258
259             
// if searchString is not empty
260             
if (searchString) {
261                 
// ajax call
262                 $j.ajax({
263                     type:
"POST",
264                     url:
"ajax_presciption.php",
265                     data: data,
266                     beforeSend: function (html) {
// this happens before actual call
267                         $j(
"#results1").html('');
268                         $j(
"#searchresults1").show();
269                         $j(
".word").html(searchString);
270                     },
271                     success: function (html) {
// this happens after we get results
272                         $j(
"#results1").show();
273                         $j(
"#results1").append(html);
274                     }
275                 });
276             }
277             
return false;
278         });
279
280
281
282         $j(
"#search_box3").keyup(function () {
283             
// getting the value that user typed
284             
var searchString = $j("#search_box3").val();
285             
// forming the queryString
286             
var data = 'search=' + searchString;
287
288             
// if searchString is not empty
289             
if (searchString) {
290                 
// ajax call
291                 $j.ajax({
292                     type:
"POST",
293                     url:
"ajax_diagnosis.php",
294                     data: data,
295                     beforeSend: function (html) {
// this happens before actual call
296                         $j(
"#results2").html('');
297                         $j(
"#searchresults2").show();
298                         $j(
".word").html(searchString);
299                     },
300                     success: function (html) {
// this happens after we get results
301                         $j(
"#results2").show();
302                         $j(
"#results2").append(html);
303                     }
304                 });
305             }
306             
return false;
307         });
308
309
310
311
312
313
314
315
316
317
318
319     });
320 </script>
321 <style>
322     body{ font-family:Arial, Helvetica, sans-serif; }
323     *{ margin:
0;padding:0; }
324     #container { margin:
0 auto; width: 600px; }
325     a { color:#DF3D82; text-decoration:none }
326     a:hover { color:#DF3D82; text-decoration:underline; }
327     ul.update { list-style:none;font-size:
1.1em; margin-top:10px }
328     ul.update li{ height:30px; border-bottom:#dedede solid 1px; text-align:left;}
329     ul.update li:first-child{ border-top:#dedede solid 1px; height:30px; text-align:left; }
330     #flash { margin-top:20px; text-align:left; }
331     #searchresults { text-align:left;padding-left: 0px; margin-top:0px; display:none; font-family:Arial, Helvetica, sans-serif; font-size:16px; color:#
000; }
332     .word { font-weight:bold; color:#
000000; }
333     #searchresults1 { text-align:left;padding-left: 0px; margin-top:0px; display:none; font-family:Arial, Helvetica, sans-serif; font-size:16px; color:#
000; }
334     #searchresults2 { text-align:left;padding-left: 0px; margin-top:0px; display:none; font-family:Arial, Helvetica, sans-serif; font-size:16px; color:#
000; }
335
336     #search_box { padding:4px; border:solid 1px #
666666; width:300px; height:30px; font-size:18px;-moz-border-radius: 6px;-webkit-border-radius: 6px; }
337     .search_button { border:#
000000 solid 1px; padding: 6px; color:#000; font-weight:bold; font-size:16px;-moz-border-radius: 6px;-webkit-border-radius: 6px; }
338     .found { font-weight: bold; font-style: italic; color: #ff0000; }
339     #search_box2 { padding:4px; border:solid 1px #
666666; width:300px; height:30px; font-size:18px;-moz-border-radius: 6px;-webkit-border-radius: 6px; }
340     #search_box3 { padding:4px; border:solid 1px #
666666; width:300px; height:30px; font-size:18px;-moz-border-radius: 6px;-webkit-border-radius: 6px; }
341
342     h2 { margin-right: 70px; }
343
344 </style>


Gõ tìm kiếm nhanh...